package uy.edu.um.ltic.server.business;

import uy.edu.um.ltic.commons.EmployeeVO;

public class Employee {

	private String name;
	private String surname;
	private int document;
	private int nEmployee;
	private String positionInCompany;
	private String currentCountry;
	private String branch;
	private String department;
	private String username;
	private String password;
	private String documentType;
	private byte[] image;
	private String availability;
	private String email;
	private boolean administrator;
	private String salt;

	public Employee(String sName, String sSurname, int iDocument,
			int iNEmployee, String sPositionInCompany, String sCurrentCountry,
			String sBranch, String sDeparment, String sUsername,
			String sPassword, String sDocumentType, byte[] bImage,
			String sAvailability, String sEmail, boolean bAdministrator,
			String se) {
		name = sName;
		surname = sSurname;
		document = iDocument;
		nEmployee = iNEmployee;
		positionInCompany = sPositionInCompany;
		currentCountry = sCurrentCountry;
		branch = sBranch;
		department = sDeparment;
		username = sUsername;
		password = sPassword;
		documentType = sDocumentType;
		image = bImage;
		availability = sAvailability;
		email = sEmail;
		administrator = bAdministrator;
		setSalt(se);
	}
	
	public Employee(){
	}
	
	public Employee(EmployeeVO em) {
		name = em.getName();
		surname = em.getSurname();
		document = em.getDocument();
		nEmployee = em.getnEmployee();
		positionInCompany = em.getPositionInCompany();
		currentCountry = em.getCurrentCountry();
		branch = em.getBranch();
		department = em.getDepartment();
		username = em.getUsername();
		password = em.getPassword();
		documentType = em.getDocumentType();
		image = em.getImage();
		availability = em.getAvailability();
		email = em.getEmail();
		administrator = em.isAdministrator();
		setSalt(em.getSalt());
	}

	public Employee(int nEmpl) {
		nEmployee = nEmpl;
	}

	public EmployeeVO convertToEmployeeVO() {
		EmployeeVO oEm = null;
		if (this != null) {
			oEm = new EmployeeVO(name, surname, document, nEmployee,
					positionInCompany, currentCountry, branch, department,
					username, password, documentType, image, availability,
					email, administrator, salt);
		}
		return oEm;
	}

	public String getDocumentType() {
		return documentType;
	}

	public void setDocumentType(String documentType) {
		this.documentType = documentType;
	}

	public byte[] getImage() {
		return image;
	}

	public void setImage(byte[] image) {
		this.image = image;
	}

	public String getAvailability() {
		return availability;
	}

	public void setAvailability(String availability) {
		this.availability = availability;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public boolean isAdministrator() {
		return administrator;
	}

	public void setAdministrator(boolean administrator) {
		this.administrator = administrator;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public int getDocument() {
		return document;
	}

	public void setDocument(int document) {
		this.document = document;
	}

	public int getnEmployee() {
		return nEmployee;
	}

	public void setnEmployee(int nEmployee) {
		this.nEmployee = nEmployee;
	}

	public String getPositionInCompany() {
		return positionInCompany;
	}

	public void setPositionInCompany(String positionInCompany) {
		this.positionInCompany = positionInCompany;
	}

	public String getcurrentCountry() {
		return currentCountry;
	}

	public void setcurrentCountry(String currentCountry) {
		this.currentCountry = currentCountry;
	}

	public String getBranch() {
		return branch;
	}

	public void setBranch(String branch) {
		this.branch = branch;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public String getCurrentCountry() {
		return currentCountry;
	}

	public void setCurrentCountry(String currentCountry) {
		this.currentCountry = currentCountry;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

}
